/* 
* @Author: fangshuqin
* @Date:   2018-05-03 11:35:17
* @Last Modified by:   ZHELIHAO\fangshuqin
* @Last Modified time: 2018-05-21 17:45:44
*/

{
    let EVENT_CLICK = Laya.Event.CLICK;

    class Tab extends ui.Hall.TabUI {
        constructor () {
            super();
            
            this.init();

        }


        init () {
            this.initEvent();
        }

        initEvent(){
            // 商城
            this.shopBox.on(EVENT_CLICK, this, ()=>{
                Public.BetAndSet.I.exit();
                
                Laya.loader.load(ASSETS.SHOP, Laya.Handler.create(null, function () {
                    Sail.io.emit(GAME_CMDS.INSHOP);
                    let shop = new Scene.Shop();
                    Sail.director.runScene(shop);
                }));
            })
        }

        resize (width, height, rate) {
            if(rate < 1){
                this.scale(rate, rate);
            }else{
                this.scale(1, 1);
            }
        }

    }

    Sail.class(Tab, "Com.Hall.Tab");
}